import { Schema } from "mongoose";

const commentSchema = new Schema({
  video: {
    type: Schema.Types.ObjectId,
    required: true,
    ref: "Video",
  },
  user: {
    type: Schema.Types.ObjectId,
    required: true,
    ref: "User",
  },
  content: { type: String, required: true },
  likeCount: { type: Number, default: 0, min: 0 },
  createTime: { type: Date, default: Date.now },
});

export default commentSchema;
